#include <stdio.h>

int arr[100];

int judge(int n);

int main(void) {
    int n, sum;   //nΪ���鳤��
    int i;
    scanf("%d\n", &n);
    for (i = 0; i < n; i++) {
        scanf("%d", &arr[i]);
    }
    sum = judge(n);
    for (i = 0; i < sum; i++) {
        printf("%d", arr[i]);
        if (i != (sum - 1))printf(" ");
    }
    return 0;
}


int judge(int n) {
    int i, k, r, sum;
    sum = n;
    for (i = 0; i < n; i++) {
        for (k = i + 1; k < sum; k++) {
            if (arr[i] == arr[k]) {
                sum--;
                for (r = k; r < sum; r++) {
                    arr[r] = arr[r + 1];
                }
                k = i;
            }
        }
    }
    return sum;
}
